<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>未成年子女信息查看</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
    <style>
        .discell {
            text-align:right;
            width:20%;
        }
        .input {
            width:35%;
        }
    </style>
</head>
<body>
<div class="mini-fit">
    <div style="height:100%;width: 100%;overflow-x: auto;overflow-y: auto;">
        <form id="form1" method="post">
            <input name="id" id="id" class="mini-hidden" style="width: 100%" readonly />
            <input name="priNum" id="priNum" class="mini-hidden" style="width: 100%" readonly />
            <br>
            <table align="center">
                <tr>
                    <td class="discell"><font color="#dc143c">*</font>姓&emsp;&emsp;名:</td>
                    <td class="input">
                        <input name="name" id="name" class="mini-textbox" required="true" emptyText="请输入姓名" readonly="readonly" />
                    </td>
                    <td class="discell">性&emsp;&emsp;别:</td>
                    <td class="input">
                        <input name="sex" id="sex" class="mini-combobox" emptyText="请选择性别" readonly="readonly"
                               data="[{ id: 1, name: '男性' },{ id: 2, name: '女性' },{ id: 0, name: '未知的性别' },{ id: 9, name: '未说明的性别' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                </tr>
                <tr>
                    <td class="discell"><font color="#dc143c">*</font>证件类型:</td>
                    <td class="input">
                        <input name="idType" id="idType" class="mini-combobox" required="true" onvaluechanged="onIdTypeMouseOut()"
                               textField="codeName" valueField="codeId" emptyText="请选择..." onclick="change()"
                               url="/azbj/inmates/baseinfo/getTbsysCode?codeType=2_13&pcodeId=-1&sn=1" />
                    </td>
                    <td class="discell">身份证号:</td>
                    <td class="input">
                        <input name="znsfId" id="znsfid" class="mini-textbox" required="false" onvaluechanged="onMouseOut()" emptyText="请输入身份证号码"
                               readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <td class="discell">出生日期:</td>
                    <td class="input">
                        <input property="editor" class="mini-datepicker" id="age" name="age" emptyText="请选择出生日期" readonly="readonly"
                               required="true" />
                    </td>
                    <td class="discell">监护人情况:</td>
                    <td class="input">
                        <input name="jianhuren" id="jianhuren" class="mini-combobox" emptyText="请选择" readonly="readonly"
                               data="[{ id: ''+'01', name: '有监护人可以履责' },{ id: ''+'02', name: '有监护人无法履责' },{ id: ''+'03', name: '无监护人' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                </tr>
                <tr>
                    <td class="discell">失&emsp;&emsp;学:</td>
                    <td class="input">
                        <input name="shixue" id="shixue" class="mini-combobox" emptyText="请选择" readonly="readonly"
                               data="[{ id: 1, name: '是' },{ id: 2, name: '否' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                    <td class="discell">流浪社会:</td>
                    <td class="input">
                        <input name="liulang" id="liulang" class="mini-combobox" emptyText="请选择" readonly="readonly"
                               data="[{ id: 1, name: '是' },{ id: 2, name: '否' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                </tr>
                <tr>
                    <td class="discell">生活困难程度:</td>
                    <td class="input">
                        <input name="kunnan" id="kunnan" class="mini-combobox" emptyText="请选择" readonly="readonly"
                               data="[{ id: ''+'01', name: '一般困难' },{ id:  ''+'02', name: '特别困难' },{ id:  ''+'03', name: '不困难' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                    <td class="discell">违法犯罪行为:</td>
                    <td colspan="3">
                        <input name="fanzui" id="fanzui" class="mini-combobox" emptyText="请选择" readonly="readonly"
                               data="[{ id: 1, name: '有' },{ id: 2, name: '无' }]"
                               textField="name" valueField="id" required="true" />
                    </td>
                </tr>
                <tr>
                    <td class="discell">
                        户籍地:
                    </td>
                    <td colspan="3" class="input">
                        <input id="nativepro" name="nativepro" class="mini-combobox" required="true" emptyText="省份"
                               style="width:180px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="nativecity" name="nativecity" class="mini-combobox" required="true" emptyText="市"
                               style="width:180px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="nativecou" name="nativecou" class="mini-combobox" required="true" emptyText="县"
                               style="width:170px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="nativevill" name="nativevill" class="mini-combobox" emptyText="街道"
                               style="width:150px;" readonly="readonly"
                               textfield="codeName" valueField="codeId"/>
                    </td>
                </tr>
                <tr>
                    <td class="discell"></td>
                    <td colspan="3">
                        <input class="mini-textbox" required="true" style="width:690px" emptyText="详细地址" id="nativenum" readonly="readonly"
                               name="nativenum" />
                    </td>
                </tr>
                <tr>
                    <td class="discell">
                        居住地:
                    </td>
                    <td colspan="3" style="width: 500px;">
                        <input id="placepro" name="placepro" class="mini-combobox" required="true" emptyText="省份"
                               style="width:180px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="placecity" name="placecity" class="mini-combobox" required="true" emptyText="市"
                               style="width:180px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="placecou" name="placecou" class="mini-combobox" required="true" emptyText="县"
                               style="width:170px;" readonly="readonly"
                               textfield="codeName" valueField="codeId" />
                        <input id="placevill" name="placevill" class="mini-combobox" emptyText="街道"
                               readonly="readonly" style="width:150px;"
                               textfield="codeName" valueField="codeId"/>
                    </td>
                </tr>
                <tr>
                    <td class="discell"></td>
                    <td colspan="3" style="width: 500px;">
                        <input class="mini-textbox" style="width: 690px" emptyText="详细地址" id="placenum" required="true" readonly="readonly"
                               name="placenum" />
                    </td>
                </tr>
            </table>
        </form>
        <div style="padding:2px;margin: 0 auto;text-align: center">
            <a class="mini-button" iconCls="fa-close" plain="true" style="font-size: 15px" onclick="onCancel()">关闭</a>
        </div>
    </div>
</div>
<script type="text/javascript">

    mini.parse();
    var form = new mini.Form("form1");
    var id = mini.get("id");
    var priNum = mini.get("priNum");
    var znsfid = mini.get("znsfid");
    var childrenForm = new mini.Form("form1");
    var nativepro = mini.get("nativepro");
    var nativecity = mini.get("nativecity");
    var nativecou = mini.get("nativecou");
    var nativevill = mini.get("nativevill");
    var nativenum = mini.get("nativenum");
    var placepro = mini.get("placepro");
    var placecity = mini.get("placecity");
    var placecou = mini.get("placecou");
    var placevill = mini.get("placevill");
    var placenum = mini.get("placenum");

    //标准方法接口定义
    function SetData(data) {
        if (data.id) {
            mini.get("id").setEnabled(false);
        }
        // 根据ID去数据库中查询数据
        $.ajax({
            url: "/azbj/social/getInfoexcel?id=" + data.id,
            type: "post",
            dataType: "json",
            success: function (zndata) {
                var zd = mini.decode(zndata);
                childrenForm.setData(zndata);
                childrenForm.setChanged(false);
                nativepro.setData([{codeId: zndata.nativepro, codeName: zndata.nativeproName}]);
                nativecity.setData([{codeId: zndata.nativecity, codeName: zndata.nativecityName}]);
                nativecou.setData([{codeId: zndata.nativecou, codeName: zndata.nativecouName}]);
                nativevill.setData([{codeId: zndata.nativevill, codeName: zndata.nativevillName}]);
                placepro.setData([{codeId: zndata.placepro, codeName: zndata.placeproName}]);
                placecity.setData([{codeId: zndata.placecity, codeName: zndata.placecityName}]);
                placecou.setData([{codeId: zndata.placecou, codeName: zndata.placecouName}]);
                placevill.setData([{codeId: zndata.placevill, codeName: zndata.placevillName}]);
            }
        });
    }

    window.onload = function () {
        form.setEnabled(false);
    }
</script>
</body>
</html>